<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>图片轮播</title>
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
    <script src="https://cdn.bootcss.com/holder/2.9.6/holder.js"></script>
<style>
*{margin: 0;padding: 0;}
#container{width: 1000px;border: 1px solid red;margin: 20px auto 0;position: relative;}
#container img{position: absolute;}
#loader{width: 100%;height: 60%; background: url('loader.gif') no-repeat center #fff;position: fixed;bottom: 0;left: 0;}
</style>
<script type="text/javascript">
$(function(){
    var oContainer=$('#container');
    var iWidth=200;//列宽
    var iSpace=10;//间隔宽
    var iOuterWidth=iWidth+iSpace;
    var iCells=0;//总列

    function setCells(){
        iCells=Math.floor($(window).innerWidth()/iOuterWidth);
        document.title=iCells;
        oContainer.css('width',iOuterWidth*iCells-iSpace);
    }
    setCells();
})
</script>    

</head>
<body>
    <div id="container"></div>
    <div id="loader"></div>
</body>
</html>